package com.ls.kdlss.util;

import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.util.Log;

/**
 * Created by Administrator on 2016/9/28.
 */

public class UserInfo {



    public static String userid="";


    public static void setUserid(Context context,String id){
        SharedPreferences mySharedPreferences= context.getSharedPreferences("Userid",
                Activity.MODE_PRIVATE);
        SharedPreferences.Editor editor = mySharedPreferences.edit();
        editor.putString("id", id);
        editor.commit();

    }


    public  static  void  setLiebiaojson(Context context,String liebiaojson){
        Log.e("TAGshar","进入");
        Log.e("liebiaojson","");
        SharedPreferences sp = context.getSharedPreferences("Lie", Context.MODE_PRIVATE);
        SharedPreferences.Editor editor = sp.edit();
        editor.putString("liebiaojson",liebiaojson);
        editor.commit();

             /*   sp.edit().putString("liebiaojson", "{\"status\":\"1\",\"data\":{\"success\":\"1\",\"message\":\"请求成功\",\"tuijian\":[{\"name\":\"电影\"},{\"name\":\"美食\"},{\"name\":\"旅游\"},{\"name\":\"家具\"},{\"name\":\"美文\"},{\"name\":\"时尚\"},{\"name\":\"育儿\"},{\"name\":\"体育\"},{\"name\":\"灵感\"},{\"name\":\"搞笑\"},{\"name\":\"文化\"},{\"name\":\"星座\"},{\"name\":\"历史\"},{\"name\":\"教育\"},{\"name\":\"测试\"}]}}").commit();*/
    }
    public  static  String  getLiebiaojson(Context context){
        Log.e("TAGgetshar","进入");
        SharedPreferences sp = context.getSharedPreferences("Lie", Context.MODE_PRIVATE);
        String liebiao = sp.getString("liebiaojson", null);
        return liebiao;
    }


}
